{# A crawl job (overseer_crawler.job_context), streamed while the section is open: its label while it runs, why it failed, what it fetched, or where an export went. #} {% from "components/macros/layout.html" import card, facts, stats_strip %} {% from "components/macros/table.html" import data_table %} {% call card("Job") %} {% if not job %}

That job is no longer kept.

{% elif job.status == "running" %}

{{ job.label or "Running" }}

{% elif job.status == "failed" %}

{{ job.error }}

{% else %}
{% if job.export %} {{ facts(job.export) }} {% if job.export_url %}Download (link good for a day){% endif %} {% else %} {{ stats_strip([ {"label": "Requested", "value": job.summary.requested if job.summary else 0}, {"label": "Fetched", "value": job.summary.fetched if job.summary else 0}, {"label": "Failed", "value": job.summary.failed if job.summary else 0}, ]) }} {{ data_table([ {"key": "url", "label": "URL", "kind": "code"}, {"key": "status", "label": "Status", "kind": "status"}, {"key": "type", "label": "Type"}, {"key": "size", "label": "Size", "align": "right"}, ], job.rows, empty="Nothing fetched") }} {% endif %}
{% endif %} {% endcall %}